package cn.iocoder.yudao.module.hs.dal.mysql.picktaskmaterial;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hs.dal.dataobject.picktaskmaterial.PickTaskMaterialDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hs.controller.admin.picktaskmaterial.vo.*;

/**
 * 拣货任务机型明细 Mapper
 *
 * @author 航盛
 */
@Mapper
public interface PickTaskMaterialMapper extends BaseMapperX<PickTaskMaterialDO> {

    default PageResult<PickTaskMaterialDO> selectPage(PickTaskMaterialPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PickTaskMaterialDO>()
                .eqIfPresent(PickTaskMaterialDO::getPickTaskId, reqVO.getPickTaskId())
                .eqIfPresent(PickTaskMaterialDO::getShipOrderId, reqVO.getShipOrderId())
                .likeIfPresent(PickTaskMaterialDO::getMaterialModeCode, reqVO.getMaterialModeCode())
                .eqIfPresent(PickTaskMaterialDO::getMaterialCount, reqVO.getMaterialCount())
                .betweenIfPresent(PickTaskMaterialDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(PickTaskMaterialDO::getId));
    }

}